home *** CD-ROM | disk | FTP | other *** search
- //
- // EventLog.m
- // Copyright (c) 1989, 1990 by Jiro Nakamura
- // All rights reserved
- //
- // Handles a log window, opens it, lets the user modify it,
- // and if anything changes, lets him or her save it before
- // closing it.
- //
- // by Jiro Nakamura (ac6y@vax5.cit.cornell.edu)
- //
- // RCS Information
- // Revision Number-> $Revision: 2.6 $
- // Last Revised-> $Date: 90/12/03 01:56:06 $
- //
- static char rcsid[] = "$Id: EventLog.m,v 2.6 90/12/03 01:56:06 jiro Exp Locker: jiro $";
-
- #import "EventLog.h"
- #import "Global.h"
- #import "cass.h" // for EVENTLOGICON
-
- @implementation EventLog
-
- -setGlobal:anObject
- {
- global = anObject;
- return self;
- }
-
- - open:sender
- {
- static BOOL alreadyInited = FALSE;
-
- if( !alreadyInited)
- {
- alreadyInited = TRUE;
- [self placeWindow: [global eventLogFrame]];
- }
-
- [self setTitle: "Event log"];
- [self setWindowIcon: EVENTLOGICON];
- [self openWith: [global eventLogFile]];
- return self;
- }
-
- - update
- {
- if( [self isDocEdited])
- [self save];
- [self setFilename: [global eventLogFile]];
- [super update];
- if( [self isVisible])
- [self selectTextEnd: self];
- return self;
- }
-
- - close
- {
- [global saveThisWindowPosition: DEFAULTEVENTLOGFRAME : self];
- [super close];
- return self;
- }
-
- @end
-